package com.moss.cloud.common.flow.operation.impl;

import com.moss.cloud.common.core.utils.SpringContextHolder;
import com.moss.cloud.common.flow.enums.TaskState;
import com.moss.cloud.common.flow.event.TaskEvent;
import com.moss.cloud.common.flow.model.NodeTask;
import com.moss.cloud.common.flow.operation.StateOperation;
import lombok.extern.slf4j.Slf4j;

@Slf4j
public class NotStartedState implements StateOperation {

    @Override
    public void stateProcess(NodeTask nodeTask) {
        log.info("未开始的任务:{},任务名称:{}", nodeTask.getId(), nodeTask.getName());
        SpringContextHolder.publishEvent(new TaskEvent(this, nodeTask));
    }
}
